package com.xyz.business.dao;

import java.sql.SQLException;
import java.util.List;

import com.xyz.business.bean.User;
import com.xyz.business.bean.query.UserForm;
import com.xyz.business.response.UserQueryResponse;

public interface UserDao {
	/**
	 * 创建用户
	 * 
	 * @param user
	 */
	public void insert(User user);

	public UserQueryResponse queryUser(UserForm form);

	public int login(User user) throws SQLException;

	public int queryUserByName(String loginname) throws SQLException;

	public void insertUser(User user) throws SQLException;

	public List<User> query() throws SQLException;

	public User queryUser(String loginname) throws SQLException;

	public int queryUserCount(User user) throws SQLException;

	public List<User> query(User user, int pageNow, int pageSize) throws SQLException;

	/**
	 * 修改用户
	 * @param user
	 * @return
	 * @throws SQLException
	 */
	public int updateUser(User user)  throws SQLException;

	/**
	 * 隐藏用户
	 * @param uid
	 * @throws SQLException  SQLException
	 */
	public void hideUser(String uid) throws SQLException;
}
